<template>
  <div class="app-container">
    <el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="140px">
      <el-form-item label="标题" prop="title">
        <el-input v-model="catalogueForm.title" />
      </el-form-item>
      <el-form-item label="图片" />
      <el-form-item label="介绍">
        <el-input v-model="catalogueForm.content" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="请输入产品介绍" />
      </el-form-item>
      <el-form-item label="SEO标题" prop="seotitle">
        <el-input v-model="catalogueForm.seotitle" />
      </el-form-item>
      <el-form-item label="SEO关键字">
        <el-input v-model="catalogueForm.seodescription" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="seo关键字，不超过80个字符" />
      </el-form-item>
      <el-form-item label="seo描述">
        <el-input v-model="catalogueForm.seodescription" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="seo描述，不超过80个字符" />
      </el-form-item>
      <el-form-item label="备注">
        <el-input v-model="catalogueForm.remark" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="Please input" />
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="dialogFormVisible = false">
        取消
      </el-button>
      <el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">
        确认
      </el-button>
      <el-button v-if="catalogueForm.status.value === 5" type="danger" @click="handleDelete(temp)">
        删除
      </el-button>
    </div>
  </div>
</template>

<script>
import { fetchList, saveAccount, changeStatusByAccountId, removeAccountById } from '@/api/supply/catalogue'
import waves from '@/directive/waves' // waves directive
import { parseTime } from '@/utils'
import Pagination from '@/components/Pagination' // secondary package based on el-pagination

export default {
  name: 'ComplexTable',
  components: { Pagination },
  directives: { waves },
  filters: {
  },
  data() {
    return {
      tableKey: 0,
      listQuery: {
        start: 1,
        perpage: 20,
        keyword: undefined,
        sort: '+id'
      },
      catalogueForm: {

      }
    }
  },
  created() {
  },
  methods: {
  }
}
</script>
